package mysql

import (
	"project/weeksrv/global"
	"project/weeksrv/models"
)

func GenerationOrder(Order *models.Order) (*models.Order, error) {
	return Order, global.DB.Create(Order).Error

}
func GetOrderByOrderSn(orderSn string) (*models.Order, error) {
	order := new(models.Order)
	return order, global.DB.Where("order_sn = ?", orderSn).First(order).Error
}
